<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function Person(name, age) {
        console.log('这里被执行了')
        this.name = name;
        this.age = age;
    }
    Person.prototype.say = function () {
        console.log('你好，我的名字叫' + this.name + '，今年' + this.age + '岁了');
    }

    function Admin(){
//        this.name = name;
//        this.age = age;
        console.log(arguments);
        var arr = [].slice.call(arguments,0)
        console.log(arr);
        Person.apply(this,arr);
    }


    Admin.prototype = Object.create(Person.prototype);
    var a = new Admin('tom',20)

</script>
</body>
</html>